﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace GoogleServicesLib.GeoCoding
{
    public class GeocodingRequest
    {
        public string Address { get; set; }

        public string LatLng { get; set; }

        public string Bounds { get; set; }

        public string Region { get; set; }

        public string Language { get; set; }

        public string Sensor { get; set; }

        public Uri ToUri()
        {
            var url = "json?"
                .Append("address=", Address)
                .Append("latlng=", LatLng)
                .Append("bounds=", Bounds)
                .Append("region=", Region)
                .Append("language=", Language)
                .Append("sensor=", Sensor)
                .TrimEnd('&');

            return new Uri(url, UriKind.Relative);
        }
    }
}
